<%= form_for(@category) do |f| %>
  <% if @category.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@category.errors.count, "error") %> prohibited this category from being saved:</h2>

      <ul>
      <% @category.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :viewname %><br />
    <%= f.text_field :viewname %>
  </div>
  <div class="field">
    <%= f.label :urlname %><br />
    <%= f.text_field :urlname %>
  </div>
  <div class="field">
    <%= f.label :sortid %><br />
    <%= f.number_field :sortid %>
  </div>
  <div class="field">
    <%= f.label :desc %><br />
    <%= f.text_field :desc %>
  </div>
  <div class="field">
    <%= f.label :visible %><br />
    <%= f.check_box :visible %>
  </div>
  <div class="actions">
    <%= f.submit :class=>'btn btn-primary' %>
  </div>
<% end %>
